"""节水模块page内容"""
from selenium.webdriver.common.by import By

from base.base_page import BasePage


class WaterConservationPage(BasePage):
    # 点击节水管理模块
    water_conservation = (By.XPATH, "(//div[text()='节水管理'])[2]")
    # 办公区页面
    water_bg = (By.XPATH, '//*[@id="route-content"]/div[3]/div[2]/div[1]/div/div[1]/div[1]/div[1]')
    # 新增按钮
    add = (By.XPATH, '//button[@class="el-button el-button--default"]')
    # 设备名称
    device_name = (By.XPATH, '(//input[@class="el-input__inner"])[1]')
    # 设备编号
    device_code = (By.XPATH, '(//input[@class="el-input__inner"])[2]')
    # 设备类型
    device_type = (By.XPATH, '(//input[@class="el-input__inner"])[3]')
    # 设备类型中选择第一个设备
    device_dalian = (By.XPATH, '//li[@class="el-select-dropdown__item"]')
    # 设备安装位置
    device_position = (By.XPATH, '(//input[@class="el-input__inner"])[4]')
    # 设备管理人
    device_people = (By.XPATH, '(//input[@class="el-input__inner"])[5]')
    # 联系电话
    device_tel = (By.XPATH, '(//input[@class="el-input__inner"])[6]')
    # 确定按钮
    button = (By.XPATH, '//button[@class="el-button el-button--primary"]')
    # 添加编辑成功
    success_text = (By.XPATH, '//h2[@class="el-notification__title"]')

    # 删除设备
    # 点击x号按钮
    del_button = (By.XPATH, '(//i[@class="el-icon-close"])[1]')
    # 弹窗确定按钮
    con_button = (By.XPATH, "//button[@type='button'and@class='el-button el-button--default el-button--small "
                            "el-button--primary ']")
    # 删除成功 断言
    del_button_success = (By.XPATH, "//p[text()='删除成功']")

    # 异常提醒
    abnormal_reminder = (By.XPATH, '//div[@class="nav"]/span[2]')
    abnormal_success = (By.XPATH, "//span[text()='阈值设置']")
    # 统计分析
    statistical_analysis = (By.XPATH, '//div[@class="nav"]/span[3]')
    statistical_success = (By.XPATH, "//div[text()='用水记录统计']")
